#include "mainwindow.h"
#include "ui_mainwindow.h"


MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    connect(ui->new_action, &QAction::triggered, this, [=]() {
        qDebug() << "New Button Was Clicked!";
    });

    connect(ui->open_action, &QAction::triggered, this, [=]() {
        qDebug() << "Open Button Was Clicked!";
    });

    ui->tool_bar->addWidget(new QPushButton("搜索"));
    ui->tool_bar->addWidget(new QLineEdit());
}

MainWindow::~MainWindow()
{
    delete ui;
}

